package com.swak.boot.config.consistency.reliablemsg;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.swak.consistency.reliablemsg.transport.ReliableMsgLogTransport;
import com.swak.consistency.reliablemsg.transport.impls.RedisReliableMsgLogTransport;
import com.swak.redis.RedisService;

/**
 * 基于数据库的存储
 * 
 * @author DELL
 */
@Configuration
@ConditionalOnClass(RedisService.class)
@ConditionalOnMissingBean({ ReliableMsgLogTransport.class })
public class RedisReliableMsgLogTransportAutoConfiguration {

	@Bean
	public RedisReliableMsgLogTransport RedisReliableMsgLogTransport() {
		return new RedisReliableMsgLogTransport();
	}
}
